#region Using
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
#endregion Using

namespace CY.GFive.Core.Business
{
	public class StudentRoom : Business.BusinessBase<StudentRoom, int>
	{
		#region Fields and Properties

		private Boolean isState = default(Boolean);
		/// <summary>
		/// 
		/// </summary>
		public Boolean IsState
		{
			get { return isState; }
			set
			{
				if (value != isState)
				{
					MarkChanged("IsState");
					isState = value;
				}
			}
		}

		private DateTime stayEndDate = DateTime.MinValue;
		/// <summary>
		/// 
		/// </summary>
		public DateTime StayEndDate
		{
			get { return stayEndDate; }
			set
			{
				if (value != stayEndDate)
				{
					MarkChanged("StayEndDate");
					stayEndDate = value;
				}
			}
		}

		private DateTime stayStartDate = DateTime.MinValue;
		/// <summary>
		/// 
		/// </summary>
		public DateTime StayStartDate
		{
			get { return stayStartDate; }
			set
			{
				if (value != stayStartDate)
				{
					MarkChanged("StayStartDate");
					stayStartDate = value;
				}
			}
		}

		private String roomCode = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String RoomCode
		{
			get { return roomCode; }
			set
			{
				if (value != roomCode)
				{
					MarkChanged("RoomCode");
					roomCode = value;
				}
			}
		}

		private String studentCode = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String StudentCode
		{
			get { return studentCode; }
			set
			{
				if (value != studentCode)
				{
					MarkChanged("StudentCode");
					studentCode = value;
				}
			}
		}

		#endregion Fields and Properties

		#region Constructors

		public StudentRoom()
		{
		}

		#endregion Constructors

		#region Base overrides

		protected override void ValidationRules()
		{
		}

		protected override StudentRoom DataSelect(int id)
		{
			return Services.DALService.StudentRoomService.Select(id);
		}

		protected override void DataUpdate()
		{
			Services.DALService.StudentRoomService.Update(this);
		}

		protected override void DataInsert()
		{
			Services.DALService.StudentRoomService.Insert(this);
		}

		protected override void DataDelete()
		{
			Services.DALService.StudentRoomService.Delete(this);
		}

		#endregion Base overrides
	}
}
